<template>
	<view>
		<view class="notice_box" @click="$goTo('pages_index/noticedetail?id='+ i.id)" v-for="i in mylist">
			<view class="notice_box_item">
				<view class="">{{i.name}}</view>
				<view class="">	{{i.createtime | date}}</view>
			</view>
			<image :src="$oss(i.image)" class="notice_box_img" mode=""></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				notices:'',
				page:1,
				mylist:[]
			};
		},
		onLoad() {
			this.notice()
		},
		onReachBottom() {
			this.page++
			this.notice()
		},
		methods:{
			notice(){
				this.$api.post('/notice',{
					types:'list',
					type:1,
					page:this.page
				}).then(res=>{
					console.log(res);
					this.mylist = [...this.mylist,...res.data.data]
				})
			},
		}
	}
</script>

<style lang="scss">
.notice_box{
	display: flex;
	width: 686rpx;
	box-sizing: border-box;
	background-color: #fff;
	border-radius: 20rpx;
	padding: 30rpx;
	margin: 30rpx auto;
	justify-content: space-between;
	align-items: center;
	.notice_box_item{
		display: flex;
		flex-direction: column;
		height: 150rpx;
		justify-content: space-around;
	}
	.notice_box_img{
		width: 150rpx;
		height: 150rpx;
	}
}
</style>
